package cn.njxzc.examples;

import java.io.File;

public class Exam9_21 {
	public static void main(String[] args) {
		File f1 = new File("c:\\autoexec.bat");
		File f2 = new File("c:\\biology.txt");
		File f3 = new File("c:\\command.com");
		File f4 = new File("c:\\windows.exe");
		System.out.println("文件:" + f1.getName()
				+ (f1.exists() ? " exists" : " not exist"));
		System.out.println("文件:" + f2.getName()
				+ (f2.exists() ? " exists" : " not exist"));
		System.out.println("文件:" + f3.getName()
				+ (f3.exists() ? " exists" : " not exist"));
		System.out.println("文件:" + f4.getName()
				+ (f4.exists() ? " exists" : " not exist"));
	}
}
